<?php

namespace haibao\erp\model\data\product;

class ProductContentInfo extends \haibao\erp\model\data\Base{
	
	/**
     * 状态 0 正常 -1 删除
     */
    const STATUS_ENABLE = 0;
    const STATUS_SHELVES = -1;

    /**
     * 数据类型
     */
    const DATA_TYPE_PRICE = 1;
    const DATA_TYPE_DESC = 2;
    const DATA_TYPE_DETAIL = 3;
    const DATA_TYPE_RETURNS = 4;
    const DATA_TYPE_IMAGE_PRO = 5;
    const DATA_TYPE_CATEGORY_INFO = 6;
    const DATA_TYPE_PROPERTY_MAP_MISAKI_PRODUCT_ID = 7;
    const DATA_TYPE_MISAKI_PRODUCT_ID = 8;


    /*
 * 属性类型
 * */
    const PROPERTY_COLOR = 1 ; //颜色
    const PROPERTY_SIZE = 2 ; //尺寸

    /**
     * 价格的货币
     */
    const DATA_TYPE_PRODUCT_PRICT_CURRENCY_1 = 'CNY';
    const DATA_TYPE_PRODUCT_PRICT_CURRENCY_2 = 'EUR';
    const DATA_TYPE_PRODUCT_PRICT_CURRENCY_3 = 'USD';
    const DATA_TYPE_PRODUCT_PRICT_CURRENCY_4 = 'GBP';

    /**
     * 单品类型
     */
    const PRODUCT_TYPE_MISAKI = 1;

    public $ProductId;
    public $Status = 0;
    public $ContentInfo;
    public $DataType;
    public $CreateTime;
    public $DataTypeArr=array();
    public static $productProMap = array(
        self::PROPERTY_COLOR =>'颜色',
        self:: PROPERTY_SIZE =>'尺码' ,
    );

	public function __construct(){
		parent::__construct();
		$this->intField('ProductId', 'ProductId',true);
		$this->intField('Status', 'Status',true);
		$this->stringField('ContentInfo', 'ContentInfo',true);
		$this->intField('DataType', 'DataType',true);
		$this->dateField('CreateTime', 'CreateTime',true);

		$this->setTableName('ProductContentInfo');
	}

	public static function initProductContentInfo(){

	    return array(
            self::DATA_TYPE_PRICE => array(),
            self::DATA_TYPE_DESC => '',
            self::DATA_TYPE_DETAIL => '',
            self::DATA_TYPE_RETURNS => '',
            self::DATA_TYPE_IMAGE_PRO => array(),
            self::DATA_TYPE_CATEGORY_INFO => '',
        );
    }
}